

from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
from base64 import b64encode

def encrypt(n, e):
    cipher = AES.new(e, AES.MODE_ECB)
    encrypted = cipher.encrypt(pad(n, AES.block_size))
    return b64encode(encrypted).decode('utf-8')